Which countries are the main drivers of reforestation?

As these results show mainly countries with a huge surface, we want to put the increase of reforestation from 1990-2020 in relation to the forest area in 1990.

## Warning: Ignoring unknown aesthetics: x, y

(source of idea https://plotly.com/r/choropleth-maps/#introduction-main-parameters-for-choropleth-outline-maps)

## Warning: Ignoring 8 observations

Is there a correlation between reforestation and deforestation?

First of all we want to show the relation of total reforestation and deforestation in the last 30 years, to get a first glimpse.

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: ggrepel: 224 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

As there are many outliers with either very high deforestation/reforestation figures, we can zoom in by changing the scale.

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: Removed 208 rows containing non-finite values (stat_smooth).
## Warning: Removed 208 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_smooth).
## Warning: Removed 208 rows containing missing values (geom_text_repel).
## Warning: ggrepel: 5 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

The figure shows already a high and not linear distrubtion of our data.

With the Shapiro-Wilk test we want to show the normality of our data.

## 
##  Shapiro-Wilk normality test
## 
## data:  corref$totalref
## W = 0.25387, p-value < 2.2e-16
## 
##  Shapiro-Wilk normality test
## 
## data:  corref$totaldef
## W = 0.16293, p-value < 2.2e-16

The values are below 0.05, the data for both, reforestation and deforestation, significantly deviate from a normal distribution. A result which was already highlited by the graph.

As the data is therefore not linear, we should choose the Spearman method to calculate the correlation.

## # A tibble: 2 x 3
##   term     totalref totaldef
##   <chr>       <dbl>    <dbl>
## 1 totalref   NA        0.206
## 2 totaldef    0.206   NA
## 
##  Pearson's product-moment correlation
## 
## data:  corref$totalref and corref$totaldef
## t = 3.2181, df = 234, p-value = 0.001473
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08027866 0.32502440
## sample estimates:
##       cor 
## 0.2058687
## # A tibble: 2 x 3
##   term     totalref totaldef
##   <chr>       <dbl>    <dbl>
## 1 totalref   NA        0.451
## 2 totaldef    0.451   NA
## Warning in cor.test.default(corref$totalref, corref$totaldef, method =
## "spearman"): Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  corref$totalref and corref$totaldef
## S = 1201838, p-value = 3.009e-13
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.4513834

However with 0.451 it doesn’t show a significant correlation, which means, at least in the last 30 years, countries did not really try “to make up” for a human driven deforestation.

What are the trends? (continents)

## `summarise()` has grouped output by 'year'. You can override using the `.groups` argument.
## No trace type specified:
##   Based on info supplied, a 'bar' trace seems appropriate.
##   Read more about this trace type -> https://plotly.com/r/reference/#bar